<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="../files/js/jquery.min.js"></script>
<script type="text/javascript" src="../files/js/jquery-1.10.2.js"></script>
<script type="text/javascript">
$(function(){
	
	
	$("#sub").click(function(){
		url = "../comment/insertComment.action";
		datas = {
			image : $("#image").val(),
			comContent : $("#comContent").val(),
		};
		$.ajax({
			asyn : true,
			type : "POST",
			url : url,
			data : datas,
			success : function(fh) {
				if(fh.msg == "0"){
					$("#tishi").text("系统出现异常!请重试");
				}else{
					parent.layer.alert("评论成功!");
					var index = parent.layer.getFrameIndex(window.name);
					setTimeout(function(){parent.layer.close(index)}, 1000);  
				}
			}
		});
	});
});
</script>
</head>
<body>
	<table id="tab">
		<tr>
			<td><input type="file" name="image" id="image"/></td>
		</tr>
		<tr>
			<td><textarea style="border: 1; overflow: auto; color: black;" id="comContent" name="comContent"></textarea></td>
		</tr>
		<tr>
			<td><button class="layui-btn layui-btn-primary" id="sub" name="sub">确定</button></td>
		</tr>
	</table>
</body>
</html>